package com.SpringDataBaseBak.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;

/**
 * @author chenming
 * @description
 * @create: 2022-02-08
 */
@Configuration
@ConfigurationProperties(prefix = "database.backup")
@Component
public class DataBaseBakConfig {

    // mysql 目标host
    private String targetHost;

    // mysql 目标username
    private String targetUsername;

    // mysql 目标password
    private String targetPassword;

    // mysql 目标库
    private String targetSchema;

    // mysql 排除前缀
    private String excludePrefix;

    // mysql 包含前缀
    private String includePrefix;

    // cron 定时任务表达式
    private long delay;

    private long maxStorageDuration;

    private String dateFormat;

    // sql保存路径
    private String filePath;

    public String getTargetHost() {
        return targetHost;
    }

    public void setTargetHost(String targetHost) {
        this.targetHost = targetHost;
    }

    public String getTargetUsername() {
        return targetUsername;
    }

    public void setTargetUsername(String targetUsername) {
        this.targetUsername = targetUsername;
    }

    public String getTargetPassword() {
        return targetPassword;
    }

    public void setTargetPassword(String targetPassword) {
        this.targetPassword = targetPassword;
    }

    public String getTargetSchema() {
        return targetSchema;
    }

    public void setTargetSchema(String targetSchema) {
        this.targetSchema = targetSchema;
    }

    public String getExcludePrefix() {
        return excludePrefix;
    }

    public void setExcludePrefix(String excludePrefix) {
        this.excludePrefix = excludePrefix;
    }

    public String getIncludePrefix() {
        return includePrefix;
    }

    public void setIncludePrefix(String includePrefix) {
        this.includePrefix = includePrefix;
    }

    public long getDelay() {
        return delay;
    }

    public void setDelay(long delay) {
        this.delay = delay;
    }

    public long getMaxStorageDuration() {
        return maxStorageDuration;
    }

    public void setMaxStorageDuration(long maxStorageDuration) {
        this.maxStorageDuration = maxStorageDuration;
    }

    public String getDateFormat() {
        return dateFormat;
    }

    public void setDateFormat(String dateFormat) {
        this.dateFormat = dateFormat;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
